{% extends 'base.html' %}
{% block page_content %}

        <div class="panel panel-primary">
            <div class="panel-heading">车辆信息列表</div>
            <div class="panel-body">
                 {% if pagpermission.has_add %}
                <div class="row">
                    <div class="col-md-offset-6 col-md-4" style="margin-bottom: 15px;">
                        <a href="/fare/caradd/" type="button" class="btn btn-primary " style="float:right;"><i class="fa fa-plus" aria-hidden="true"  style="margin-right: 6px;"></i>增加</a>
                    </div>
                </div>
                {% endif %}
                <table class="table table-striped table-hover table-bordered" >
                    <thead>

                    <th class="bg-info text-center" >车号</th>
                    <th class="bg-info text-center" >司机</th>
                    <th class="bg-info text-center" >单价(每公里)</th>
                     <th class="bg-info text-center" >备注说明</th>
                    <th class="bg-info text-center"  >允许的操作</th>
                    </thead>
                    <tbody>
                    {% for row in carlist %}
                        <tr>

                            <td>{{ row.plate_number }}</td>
                            <td>{{ row.driver }}</td>
                            <td>{{ row.price }}</td>
                            <td>{{ row.remarks }}</td>
                            <td>
                                 {% if pagpermission.has_edit %}
                                <a href="/fare/caredit/{{ row.id }}/" class="btn btn-info"> <i class="fa fa-pencil-square-o"
                                                                                   aria-hidden="true" style="margin-right: 6px;"></i>编辑</a>
                                 {% endif %}
                                 {% if pagpermission.has_del %}
                                <a href="/fare/cardel/{{ row.id }}/" class="btn btn-danger"><i class="fa fa-trash-o fa-fw"
                                                                                  aria-hidden="true" style="margin-right: 6px;"></i>删除</a>
                                 {% endif %}

                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>

{% endblock %}

